<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePlaceholder extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /**
         * 模板占位符表
         */
        Schema::connection('cgs')->create('placeholder', function (Blueprint $table) {
            $table->increments('id');
            $table->string('placeholder_name')->default('')->comment('占位符名称');
            $table->string('placeholder_code')->default('')->comment('占位符标识');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::connection('cgs')->dropIfExists('placeholder');
    }
}
